<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <title>统一地图平台</title><link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
    <style>
        html,
        body,
        #mapui {
            width: 100%;
            height: 100%;
        }

        html,
        body {
            margin: 0;
            padding: 0;
        }
    </style>
</head>

<body>
    <div id="mapui"></div>

    <script src="./js_example/script/map.min.js"></script>
    <script src="./js_example/script/demo.js"></script>
    <script src="./js_thematic_map_example/script/jq/jquery.min.js"></script>
    <script>
        var amap = null;
        var that = this;
        map.Factory.create('mapui', {
            center: [116.443571, 39.887549],
            fullExtent: {
                xmin: 90.992204,
                ymin: 10.979711,
                xmax: 120.5338915,
                ymax: 50.543712
            },
            zoom: 11,
            projection: 'EPSG:4326',
            strategy: ['mapboxgl', 'openlayers'],
            style: style
        }, (o) => {
            amap = o;
            map.Factory.loadSpecialMap('mapv' , () =>{
                that.init(amap);
            })
        });


        function init(map) {
            
            $.get('./js_thematic_map_example/data/beijing-village.json', function (data) {

                var dataSet = new special_mapv.DataSet(data);

                var options = {
                    fillStyle: 'rgba(255, 80, 53, 0.8)',
                    strokeStyle: 'rgba(250, 255, 53, 0.8)',
                    size: 3,
                    lineWidth: 1,
                    draw: 'simple'
                };
                var mapvLayer = new special_mapv.FmLayer(map, dataSet, options);
            });
        }
    </script>
</body>

</html>